home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / pcl-rev4.lha / cmu-low.lisp < prev    next >
Lisp/Scheme  |  1990-01-25  |  2KB  |  60 lines

  1. ;;;-*-Mode:LISP; Package:(PCL LISP 1000); Base:10; Syntax:Common-lisp -*-
  2. ;;;
  3. ;;; *************************************************************************
  4. ;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
  5. ;;; All rights reserved.
  6. ;;;
  7. ;;; Use and copying of this software and preparation of derivative works
  8. ;;; based upon this software are permitted.  Any distribution of this
  9. ;;; software or derivative works must comply with all applicable United
  10. ;;; States export control laws.
  11. ;;; 
  12. ;;; This software is made available AS IS, and Xerox Corporation makes no
  13. ;;; warranty about the software, its performance or its conformity to any
  14. ;;; specification.
  15. ;;; 
  16. ;;; Any person obtaining a copy of this software is requested to send their
  17. ;;; name and post office or electronic mail address to:
  18. ;;;   CommonLoops Coordinator
  19. ;;;   Xerox PARC
  20. ;;;   3333 Coyote Hill Rd.
  21. ;;;   Palo Alto, CA 94304
  22. ;;; (or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa)
  23. ;;;
  24. ;;; Suggestions, comments and requests for improvements are also welcome.
  25. ;;; *************************************************************************
  26. ;;; 
  27. ;;; This is the CMU Lisp version of the file low.
  28. ;;; 
  29.  
  30. (in-package 'pcl)
  31.  
  32.   ;;   
  33. ;;;;;; Cache No's
  34.   ;;  
  35.  
  36. ;;; Abuse the type declaration, but it generates great code.
  37.  
  38. ;(defun symbol-cache-no (symbol mask)
  39. ;  (logand (the fixnum (system:%primitive lisp::make-immediate-type
  40. ;                     symbol
  41. ;                     system::%+-fixnum-type))
  42. ;      (the fixnum mask)))
  43. ;
  44. ;(clc::deftransform symbol-cache-no symbol-cache-no-transform (symbol mask)
  45. ;  `(logand (the fixnum (system:%primitive lisp::make-immediate-type
  46. ;                      ,symbol
  47. ;                      system::%+-fixnum-type))
  48. ;       (the fixnum ,mask)))
  49.  
  50. (defun object-cache-no (symbol mask)
  51.   (logand (the fixnum (system:%primitive lisp::make-immediate-type
  52.                      symbol
  53.                      system::%+-fixnum-type))
  54.       (the fixnum mask)))
  55.  
  56. (clc::deftransform object-cache-no object-cache-no-transform (symbol mask)
  57.   `(logand (the fixnum (system:%primitive lisp::make-immediate-type
  58.                       ,symbol
  59.                       system::%+-fixnum-type))
  60.        (the fixnum ,mask)))